using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace dvrz {
  public partial class Form1 : Form {
    Test test=new Test();
    public Form1() {
      InitializeComponent();
    }

    private void bLoad_Click(object sender, EventArgs e) {
      Data.Load(@"c:\home\kag\dvrz\EURUSD_2001_2006.txt");
      tLearnInfo.Text="Data loaded";
    }

    private void bLearn_Click(object sender, EventArgs e) {
      test.Learn(Data.Quotes);
      tLearnInfo.Text="End";
    }

    private void bPredict_Click(object sender, EventArgs e) {
      float r=test.Predict(Data.Quotes, int.Parse(tIndex.Text));
      tResult.Text=r.ToString();
    }
  }
}